import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';

import { aroAnimation } from '../../../animation';

@Component({
  selector: 'app-cover',
  templateUrl: './cover.component.html',
  styleUrls: ['./cover.component.css'],
  animations: [aroAnimation]
})
export class CoverComponent implements OnInit, OnDestroy {

  protected cover: any;

  constructor(private router: Router) {


  }

  ngOnInit() {
    this.cover = setInterval(() => {
      this.router.navigate(['./content/home']);
    }, 3000);
  }

  ngOnDestroy() {
    clearInterval(this.cover);
  }



}
